add config tests in GPSBabel.pro.
authortsteven4 <tsteven4@gmail.com>
Sat, 12 May 2018 16:54:02 +0000 (10:54 -0600)
committertsteven4 <tsteven4@gmail.com>
Sat, 12 May 2018 16:54:02 +0000 (10:54 -0600)
specifically, we look for stdarg.h and unistd.h for zlib.

.gitignore
GPSBabel.pro
config.tests/stdarg/.gitignore [new file with mode: 0644]
config.tests/stdarg/main.cpp [new file with mode: 0644]
config.tests/stdarg/stdarg.pro [new file with mode: 0644]
config.tests/unistd/.gitignore [new file with mode: 0644]
config.tests/unistd/main.cpp [new file with mode: 0644]
config.tests/unistd/unistd.pro [new file with mode: 0644]

index 3c95133afc35db50143a70cb4c85ee30e4d2bdfc..108b097a1f17c50825aecae651c4201156e87ac4 100644 (file)
@@ -11,6 +11,9 @@
 /gpsbabel.html
 /gpsbabel.pdf
 /Makefile
+/.qmake.cache
+/.qmake.stash
+/GPSBabel
 *.o
 /GPSBabel[0-9]*.[0-9]*.[0-9]*/
 /GPSBabel[0-9]*.[0-9]*.[0-9]*.tar.bz2
index 2642a6c9576e9c6e0f615da9119f6c21f6ea1c9c..96154c1c2b767fb00ba04d300ecde34af50e324c 100644 (file)
@@ -134,8 +134,18 @@ HEADERS =  \
 
 INCLUDEPATH += zlib
 
+load(configure)
+
 macx|linux {
-  DEFINES += HAVE_NANOSLEEP HAVE_LIBUSB HAVE_GLOB HAVE_UNISTD_H
+  qtCompileTest(unistd) {
+    # this is used by zlib
+    DEFINES += HAVE_UNISTD_H
+  }
+  qtCompileTest(stdarg) {
+    # this is used by zlib
+    DEFINES += HAVE_STDARG_H
+  }
+  DEFINES += HAVE_NANOSLEEP HAVE_LIBUSB HAVE_GLOB
   SOURCES += gbser_posix.cc
   JEEPS += jeeps/gpslibusb.cc
   INCLUDEPATH += jeeps
diff --git a/config.tests/stdarg/.gitignore b/config.tests/stdarg/.gitignore
new file mode 100644 (file)
index 0000000..d2b5289
--- /dev/null
@@ -0,0 +1,2 @@
+/Makefile
+/stdarg
diff --git a/config.tests/stdarg/main.cpp b/config.tests/stdarg/main.cpp
new file mode 100644 (file)
index 0000000..dc1abf7
--- /dev/null
@@ -0,0 +1,2 @@
+#include <stdarg.h>
+int main() { return 0; }
diff --git a/config.tests/stdarg/stdarg.pro b/config.tests/stdarg/stdarg.pro
new file mode 100644 (file)
index 0000000..bba41b9
--- /dev/null
@@ -0,0 +1 @@
+SOURCES = main.cpp
diff --git a/config.tests/unistd/.gitignore b/config.tests/unistd/.gitignore
new file mode 100644 (file)
index 0000000..ff434c8
--- /dev/null
@@ -0,0 +1,2 @@
+/Makefile
+/unistd
diff --git a/config.tests/unistd/main.cpp b/config.tests/unistd/main.cpp
new file mode 100644 (file)
index 0000000..3d1e130
--- /dev/null
@@ -0,0 +1,2 @@
+#include <unistd.h>
+int main() { return 0; }
diff --git a/config.tests/unistd/unistd.pro b/config.tests/unistd/unistd.pro
new file mode 100644 (file)
index 0000000..bba41b9
--- /dev/null
@@ -0,0 +1 @@
+SOURCES = main.cpp